package test3_11;

import java.util.Arrays;

public class Test_merge {
    public static void main(String[] args) {
        /*
        v1={1,2,3} v2={4,5,6} => v={1,2,3,4,5,6}
         */

        int[] v1 = {1, 2, 3};
        int[] v2 = {4, 5, 6};
        int[] v = new int[v1.length + v2.length];
        int index = 0;
        for (int i = 0; i < v1.length; i++) {
            v[index++] = v1[i];
        }
        for (int i = 0; i < v2.length; i++) {
            v[index++] = v2[i];
        }

        System.out.println(Arrays.toString(v));
    }
}
